
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import text
from sqlalchemy import create_engine
from db.mysqlconn import getMySession,myeng,mydbkey

from sqlalchemy.ext.automap import automap_base 


class MyDaoSvr:
    
    def __init__(self):
        self.engine,self.session,self.Base,self.classes=mydbkey();
    def mydbkey(self):
        return self.engine,self.session,self.Base,self.classes
 
md=MyDaoSvr();
def getPrompt(id):
    engine,session,Base,classes=md.mydbkey();
    Prompt = classes.t_prompt;
    result=session.query(Prompt).filter(Prompt.id==id).first();
    return result;

    